{extend name="main/index" /}
{block name="main"}
<!-- Start right content -->
<div class="content-page">
    <!-- ============================================================== -->
    <!-- Start Content here -->
    <!-- ============================================================== -->
    <div class="content">
        <!-- Page Heading Start -->
        <div class="page-heading">
            <h1><i class='fa fa-table'></i>添加用户</h1>
            <h3>Basic & Simple Sortable Tables</h3></div>
        <!-- Page Heading End-->                <!-- Your awesome content goes here -->


        <div class="row">
            <div class="col-md-12">
                <p>
                    给 <b>{$name['username']}</b> 分配权限
                </p>

                <form action="{:url('admin/user/saverole', ['id'=>$name['id']])}" method='post'>
                    <p style="width:600px">
                        {volist name="role" id="v" key="k"}
                        <input type="checkbox" name="{$v['name']}"  value="{$v['id']}" {if in_array($v['id'],$arr)}checked{/if}>{$v['name']}
                            &nbsp;
                            &nbsp;
                            &nbsp;
                        {/volist}
                    </p>
                    <input type="submit" value="保存" class="btn btn-primary">

                </form>

            </div>
        </div>

        <!-- Footer Start -->

        <!-- Footer End -->
    </div>
    <!-- ============================================================== -->
    <!-- End content here -->
    <!-- ============================================================== -->

</div>
<!-- End right content -->

{/block}